package com.lintesis.lintesismodel.personas;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.lintesis.lintesismodel.common.Type;
import com.lintesis.lintesismodel.users.Person;
import com.lintesis.utils.reflection.ReflectionUtils;
import javax.persistence.ManyToOne;

@Entity
public class Medico extends Person{
	
	@Column(unique=true)	
	private String matricula;
	
	@ManyToOne
	private Type area;

	public Type getArea() {
		return area;
	}

	public void setArea(Type area) {
		this.area = area;
	}
	
	public Medico() {}
	
	@Override
	public void doAfterDelete() {
		// TODO Auto-generated method stub
	}
	
	@Override
	public void doAfterSave() {
		// TODO Auto-generated method stub
	}

	@Override
	public void doBeforeDelete() {
		// TODO Auto-generated method stub
	}

	@Override
	public void doBeforeSave() {
		// TODO Auto-generated method stub
	}
	
	@Override
	public Integer getId() {
		return null;
	}

	@Override
	public String getObjectDescription() {
		return null;
	}

	public String getMatricula() {
		return matricula;
	}

	public void setMatricula(String matricula) {
		this.matricula = matricula;
	}
	
	@Override
	public boolean equals(Object object) {
		boolean retorno = false;
		try {
			retorno = ReflectionUtils.compareObjects(this, object, 3);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return retorno;
	}

}
